<div class="widget">
  <table class="list">
    <tr>
      <th colspan="4"><%= Alchemy.t('Your last updated pages') %></th>
    </tr>
  <% if @last_edited_pages.blank? %>
    <tr class="even">
      <td colspan="4"><%= Alchemy.t('no pages') %></td>
    </tr>
  <% else %>
    <% @last_edited_pages.each do |page| %>
    <tr class="<%= cycle('even', 'odd', :name => 'edited_pages') %>">
      <td>
        <%= link_to_if((page.locked_by.blank? || page.locked_by == current_alchemy_user.id), page.name, edit_admin_page_path(page)) %>
      </td>
      <% if multi_site? %>
      <td>
        <small><%= page.site_name %></small>
      </td>
      <% end %>
      <td>
        <% if page.site_languages.many? %>
        <small><%= page.language.code.upcase %></small>
        <% end %>
      </td>
      <td>
        <small><%= l(page.updated_at, format: :'alchemy.short_datetime') %></small>
      </td>
    </tr>
    <% end %>
  <% end %>
  </table>
</div>
<% reset_cycle('edited_pages') %>
